//package com.woniuxy.component2;
//
///**
// * @author kevin kwok
// * @create 2021-05-24 17:43
// */
//import com.woniuxy.common.Result2;
//import org.springframework.web.bind.annotation.ControllerAdvice;
//import org.springframework.web.bind.annotation.ExceptionHandler;
//import org.springframework.web.bind.annotation.ResponseBody;
//
//@ControllerAdvice
//public class GlobalExceptionHandler {
//
//    @ExceptionHandler(Exception.class)
//    @ResponseBody
//    public Result2 handleException(Exception e) {
//        System.out.println("出现异常:" + e.getMessage());
//        e.printStackTrace();
//        return new Result2("400", "服务器开了个小差，程序员小哥正在努力修复，请稍等。错误提示：" + e.getMessage(), null, null);
//    }
//
//}
